.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "KODESPEL" 1 "2023-01-16" "0.1.1+20220227_e0095c7" "SlackBuilds.org"
.SH NAME
kodespel \- spell-checker for source code
.\" RST source for kodespel(1) man page. Convert with:
.
.\" rst2man.py kodespel.rst > kodespel.1
.
.SH SYNOPSIS
.sp
kodespel [\fB\-d\fP \fIdictionary\fP] \fIfile\fP [\fIfile\fP ...]
.sp
kodespel \fB\-\-list\-dicts\fP
.SH DESCRIPTION
.sp
kodespel is a spellchecker for source code. kodespel\(aqs nifty trick
is that it knows how to split common programming identifiers like
\(aqgetAllStuff\(aq or \(aqDoThingsNow\(aq or \(aqnum_objects\(aq or \(aqHTTPResponse\(aq into
words, feed those to \fBispell\fP(1), and interpret ispell\(aqs output.
.sp
Basic usage is to run kodespel on one or more individual files
or directories:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
kodespel foo.py main.go README.md
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
kodespel uses a collection of dictionaries to spellcheck each file.
It always uses the \fBbase\fP dictionary, which is a set of words
common in source code across languages and platforms. Additionally,
there is a language\-specific dictionary for each language kodespel
knows about. Language\-specific dictionaries are automatically chosen
for you.
.sp
In this example, kodespell will spellcheck each file with:
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
.IP \(bu 2
\fBfoo.py\fP: dictionaries \fBbase\fP and \fBpython\fP
.IP \(bu 2
\fBmain.go\fP: dictionaries \fBbase\fP and \fBgo\fP
.IP \(bu 2
\fBREADME.md\fP: dictionary \fBbase\fP only (no language dictionary for Markdown)
.UNINDENT
.UNINDENT
.UNINDENT
.sp
If run on a directory, kodespel will recurse into that directory
and spellcheck every file that it recognizes:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
kodespel src/
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
will search for \fB*.py\fP, \fB*.c\fP, \fB*.h\fP, and any other
extension that kodespel has built\-in support for.
(Currently: Python, Perl, Go, C, C++, and Java).
Unsupported files are ignored, but if you pass those filenames
explicitly, they will be checked.
.INDENT 0.0
.INDENT 3.5
Note: the SlackBuilds.org package of \fBkodespel\fP includes a
\fBsbo\fP dictionary. It will only be used if you enable it
with \fB\-d sbo\fP\&.
.UNINDENT
.UNINDENT
.sp
kodespel ships with several other common dictionaries.
For example, if the program you are spellchecking uses
a lot of Unix system calls, you would add the \fBunix\fP dictionary:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
kodespel \-d unix foo.py main.go README.md
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The \fB\-d\fP option applies to every file being checked.
.sp
To see the list of all builtin dictionaries, run:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
kodespel \-\-list\-dicts
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Finally, you can create your own dictionaries,
and use as many of them as you like.
A dictionary is a plain text file with one word per line:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ cat myproject.dict
nargs
args
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
You can specify your personal dictionaries with \fB\-d\fP,
just like kodespel\(aqs builtin dictionaries:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
kodespel \-d unix \-d myproject.dict foo.py ...
.ft P
.fi
.UNINDENT
.UNINDENT
.SH OPTIONS
.INDENT 0.0
.TP
.B  \-h\fP,\fB  \-\-help
Show built\-in help and exit.
.TP
.B  \-a\fP,\fB  \-\-all
Report every single misspelling [default: \fB\-\-unique\fP].
.TP
.B  \-u\fP,\fB  \-\-unique
Report each misspelling only once [default].
.TP
.BI \-d \ dict\fR,\fB \ \-\-dictionary\fB= dict
Use this dictionary. \fIdict\fP may be a filename or a dictionary name. Use
multiple times to include multiple dictionaries.
.TP
.B  \-\-list\-dicts
List available dictionaries and exit.
.TP
.B  \-\-dump\-dict
Build custom dictionary (respecting \fB\-d\fP options).
.TP
.BI \-\-make\-dict\fB= dictfile
Write unknown words to \fIdictfile\fP\&.
.TP
.BI \-i \ string\fR,\fB \ \-\-ignore\fB= regex
Ignore any words matching \fIregex\fP\&.
.TP
.B  \-C\fP,\fB  \-\-compound
Allow compound words (e.g. \fBgetall\fP) [default].
.TP
.B  \-\-no\-compound
Do not allow compound words
.TP
.BI \-W \ N\fR,\fB \ \-\-wordlen\fB= N
Ignore words with <= \fIN\fP characters [default: 3].
.UNINDENT
.SH EXIT STATUS
.INDENT 0.0
.IP \(bu 2
\fB0\fP \- success; no misspellings found.
.IP \(bu 2
\fB1\fP \- at least one misspelling found \fIor\fP there was an error reading
one or more input file (including encoding errors for non\-UTF8 files).
.IP \(bu 2
\fB2\fP \- invalid command line option(s).
.UNINDENT
.SH FILES
.INDENT 0.0
.TP
.B \fB/usr/share/kodespel/\fP
The default dictionaries are stored here.
.UNINDENT
.SH LIMITATIONS
.sp
\fBkodespel\fP has no option to read from standard input. However, on Linux,
you can run \fBkodespel\fP \fB/dev/stdin\fP\&.
.sp
\fBkodespel\fP can only handle \fBUTF\-8\fP encoding (which includes 7\-bit \fBASCII\fP).
It will choke on files that use e.g. \fBISO\-8859\fP encoding.
.sp
\fBkodespel\fP writes its output to \fBstderr\fP, not \fBstdout\fP\&. This makes
it difficult to use it from a script. Try e.g:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
kodespel <args> 2>&1 | <command>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Also, if you get exit status 1, you can\(aqt tell if that\(aqs an actual error
or misspellings were found, without examining the actual output.
.SH COPYRIGHT
.sp
See the file /usr/doc/kodespel\-0.1.1+20220227_e0095c7/LICENSE.txt for license information.
.SH AUTHORS
.sp
kodespel was written by Greg Ward.
.sp
This man page written (mostly copied and adapted from README.md and
the \-\-help output) for the SlackBuilds.org project by B. Watson, and
is licensed under the WTFPL.
.SH SEE ALSO
.sp
The kodespel homepage: \fI\%https://pypi.org/project/kodespel/\fP
.sp
\fBcodespell\fP(1)
.\" Generated by docutils manpage writer.
.
